package system

import "seven-admin/app/collection"

type OperateLog struct {
	collection.Model
	AdminId   uint   `gorm:"not null;default:0;comment:'操作人ID'"`
	Type      string `gorm:"not null;default:'';comment:'请求类型: GET/POST/PUT'"`
	Title     string `gorm:"default:'';comment:'操作标题'"`
	Ip        string `gorm:"not null;default:'';comment:'请求IP'"`
	Url       string `gorm:"not null;default:'';comment:'请求接口'"`
	Method    string `gorm:"not null;default:'';comment:'请求方法'"`
	Args      string `gorm:"comment:'请求参数';type:text"`
	Error     string `gorm:"comment:'错误信息'"`
	Status    uint8  `gorm:"not null;default:0;comment:'执行状态: 1=成功, 2=失败'"`
	StartTime int64  `gorm:"not null;default:0;comment:'开始时间'"`
	EndTime   int64  `gorm:"not null;default:0;comment:'结束时间'"`
	TaskTime  int64  `gorm:"not null;default:0;comment:'执行耗时'"`
	TenantId  uint   `gorm:"not null;default:0;comment:'租户ID'"`
}
